test: add test for type promotion in avoid_unnecessary_return_variable#308
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new test case to verify that the avoid_unnecessary_return_variable lint rule does not report when a local variable is promoted to a generic type and returned. It also reformats an existing test case signature. The review feedback suggests improving the formatting of the modified test signature to avoid splitting the return type and method name, and removing trailing whitespace in the newly added test case.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…eturn_variable rule test
…le is used in string interpolation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds two new test cases to the avoid_unnecessary_return_variable lint rule tests to cover scenarios involving type promotion and variables used in subsequent return statements, alongside a minor test rename. The review feedback suggests improving the type promotion test by using Map<String, Object> instead of Map<String, dynamic> to ensure type promotion is statically required, and refactoring the second test to pass a boolean parameter instead of using a dummy 1 == 1 condition.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Closes #225 |
… improve type safety and parameter usage
Closes #226